ctf
1.5k words
映入眼帘的和CM1一样,也都是吃满20个给flag 还是打开CE追一下值 这里吃到第四个的时候其实就ok了 然后尝试改一下值,会发现改了没反应,或者改了也不生效一会就变回去了 猜测是有什么恢复逻辑之类的,于是给值的内存写入部分下个断点。 看了下三个地址当中的这个是主要的判断,因为每秒好像都在处理逻辑 看一下汇编,好像是这里一直在赋值. 再往上走了下看看edx的值是从哪来的 挨个下了断点简单看了下是 1.[rax+000000B8]内存指向的值赋给了rdx 1.1这里看下rdx被赋值的地址指向了一个8f 24 2.然后eax = 6208CECB 3.再imul[rdx]就是rdx指向的值和eax做了个乘法,然后将乘积的取了低位32给了la也就是rax..高位的32位给了ld也就是这里的rdx,可以看下面这个。 123456>>> print(bin((0x248f*0x6208CECB)))0b11100000000000000000000000000000111101100101>>> print(hex(0b11...
Uncategorized
4.6k words
首先需要理解的是异或,这个非常简单,举几个例子 123456789101112131415160 ^ 1 = 11 ^ 0 = 10 ^ 0 = 01 ^ 1 = 0一个数值 ^ 另一个数值 = 亦或中间值一个数值 ^ 亦或中间值 = 另一个数值另一个数值 ^ 亦或中间值 = 一个数值任意数值 ^ 0 = 任意数值 接下来是一个利用思路,如果我们此时有一个字符串是10086,我们将其与一个iv进行简单的亦或. 1234567891010086 变化成下面这个亚子0x31 0x30 0x30 0x38 0x36iv = 0x6b 0x72 0x62 0x76 0x67然后进行对应的亦或,变成0x5a 0x42 0x52 0x4e 0x51 此时如果想让他变回"10086"只需要再和iv亦或一次即可。 但如果我要将其"10086"在亦或后变成其他数值的话,只需要操作iv即可。 比如我要把"10086"与iv亦或后变成20086。 我就可以将"1"与iv亦或后的0x5a,与"2"的he...
32k words
Usernmap1234567891011121314151617181920212223242526└─$ sudo nmap -sS 10.129.224.232 -p53,80,88,135,139,389,445,464,593,636,3268,3269,5985,9389,49666,49670,49671,49672,57884,57889 -sV -T4 --min-rate=2000 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-02 00:15 EDTNmap scan report for 10.129.224.232 (10.129.224.232)Host is up (0.61s latency).PORT STATE SERVICE VERSION53/tcp open domain Simple DNS Plus80/tcp open http nginx 1.25.588/tcp open kerberos-...
25k words
USERnmap1234567891011121314151617181920212223242526272829303132333435└─$ sudo nmap -sS 10.129.104.149 -p22,25,80,1337,5000, -sV --min-rate=3000Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-05-22 05:42 EDTStats: 0:01:01 elapsed; 0 hosts completed (1 up), 1 undergoing Service ScanService scan Timing: About 60.00% done; ETC: 05:44 (0:00:40 remaining)Nmap scan report for 10.129.104.149 (10.129.104.149)Host is up (0.47s latency).PORT STATE SERVICE VERSION22/tcp open ssh OpenSSH 9...
13k words
Nmap1234567891011121314151617181920212223└─$ sudo nmap -sS 10.10.11.11 -p- --min-rate=3000 -OStarting Nmap 7.94SVN ( https://nmap.org ) at 2024-05-26 02:00 EDTWarning: 10.10.11.11 giving up on port because retransmission cap hit (10).Stats: 0:00:34 elapsed; 0 hosts completed (1 up), 1 undergoing SYN Stealth ScanSYN Stealth Scan Timing: About 53.82% done; ETC: 02:01 (0:00:29 remaining)Nmap scan report for 10.10.11.11 (10.10.11.11)Host is up (1.0s latency).Not shown: 64252 closed tcp ports (res...
11k words
12345678910111213141516└─$ sudo nmap -sS -sV -O 10.129.36.46 -p22,80 --min-rate=3000 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-05-18 04:57 EDTNmap scan report for bucket.htb (10.129.36.46)Host is up (0.61s latency).PORT STATE SERVICE VERSION22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4 (Ubuntu Linux; protocol 2.0)80/tcp open http Apache httpd 2.4.41Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed portAggressive OS guesses: Linux 4.1...
17k words
12345678910111213141516└─$ sudo nmap -sS 10.129.96.167 --min-rate=3000 -p22,2379,2380,8443,10249,10250,10256, -sV -OStarting Nmap 7.94SVN ( https://nmap.org ) at 2024-05-16 04:21 EDTStats: 0:00:45 elapsed; 0 hosts completed (1 up), 1 undergoing Service ScanService scan Timing: About 85.71% done; ETC: 04:22 (0:00:08 remaining)Nmap scan report for 10.129.96.167 (10.129.96.167)Host is up (0.22s latency).PORT STATE SERVICE VERSION22/tcp open ssh OpenSSH 7.9p1 Debian...
Uncategorized
1.7k words
说实话我感觉64的比32的难不少..应该是我笨的关系。 其中比较逆天的是bextr我着实找不到太多资料最后debug了半天发现了规律 举个栗子比如这里bextr rbx,rcx,rdx rcx = 0b100010100 rdx = 302 rbx的值就是rcx>>2,或者说是忽略掉低位的两位 123100010100 >>2#变成1000101 然后取低位开始数3位 1231000101#取3位101 于是rbx = 0b101 = 5 再举个例子比如:2300就可以拆为 23 00 代表从第0位开始取23位 xlat获取在[rbx]的地址+al的偏移的内容,然后再赋值给到al 1xlat BYTE PTR ds:[rbx] 这里stosb是根据df的值来决定,给al值赋给rdi后,目的地址,或是说这里的rdi的地址会+1或者-1,可以看作是前进或者后退,这样的话仅通过操作df就可以控制指针方向了,不过这里用不到df来做指向呢 XD 120x00400639 aa stosb byte [rdi], al0x0040...
Uncategorized
1.8k words
如果知道这几个汇编指令的情况下这题其实还算是蛮简单,问题指令利用部分学到了xchg和bswap以及pext,自己做出来了很开心o( ̄▽ ̄)ブ。 123//ecx flag.txt address0x08048558 : pop ecx ; bswap ecx ; ret0x08048555 : xchg byte ptr [ecx], dl ; ret xchg例子 这里引用的https://www.felixcloutier.com/x86/xchg 123TEMP := DEST;DEST := SRC;SRC := TEMP; bswap则是大小端序之间互相转换 1234567891011121314151617TEMP := DESTIF 64-bit mode AND OperandSize = 64 THEN DEST[7:0] := TEMP[63:56]; DEST[15:8] := TEMP[55:48]; DEST[23:16] := TEMP[47:40]; DEST[31:24] := TEM...
Uncategorized
11k words
朋友发了个zentao新报的漏洞,研究了一下利用起来还蛮简单,就写了下poc 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859import requestsimport randomimport stringUA = "flower Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 flower/majyo-party"headers = { "User-Agent": UA, "Accept": "*/*", "Accept-Encoding": "gzip, deflate", }def generate...